home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / tcmouse.zip / TCMOUSE.DEF
Text File  |  1987-12-10  |  2KB  |  79 lines

  1. ;tcpopup.def -- turbo C popup mouse menu for cursor control, etc
  2. ;                                       S Powsner 11/25/87
  3. ;
  4. ;    Set up initial labels for mouse commands
  5.      begin anyb,anyb,anyb,mlfast,mrfast,mouseu,moused,16,40
  6.  
  7. ;    -------------------- Mouse left -----------------------
  8. mlfast:    MATCH 25,20,,"F6-Message",cursorl,ml20    ;if still edit mode go left
  9. cursorl: TYPE 0,75           ; left cursor
  10.  
  11. ml20:    ASSIGN ,,,mlslow,mrslow,,,160
  12.  
  13. mlslow: MATCH 25,20,,"F6-Message",ml40,cursorl  ;if still no edit, left slowly
  14.  
  15. ml40:   EXECUTE ml45,cursorl
  16. ml45:      ASSIGN ,,,mlfast,mrslow,,,16
  17.  
  18. ;    ------------------- Mouse right -----------------------
  19. mrfast:    MATCH 25,20,,"F6-Message",cursorr,ml20    ;if still edit mode go right
  20. cursorr: TYPE 0,77           ; right cursor
  21.  
  22. mrslow:    Match 25,20,,"F6-Message",mr40,cursorr    ;if still no edit, right slow
  23.  
  24. mr40:    EXECUTE ml45,cursorr
  25.  
  26. ;    --------------------- Mouse up -----------------------
  27. mouseu:   TYPE 0,72           ; up cursor
  28.  
  29. ;    ------------------- Mouse down -----------------------
  30. moused:   TYPE 0,80           ; down cursor
  31.  
  32. nothing:  NOTHING
  33.  
  34. ;    -------------------- Any Button ---------------------------
  35. ;
  36. anyb:    MATCH 25,20,,"F6-Edit",mainm,anyb5    ;non-edit
  37. anyb5:    MATCH 25,20,,"F6-Message",editm,mainm    ;edit
  38.  
  39. mainm:    MENU    ,6,67,NORMAL
  40.     OPTION    "select",    tenter
  41.     OPTION    "backout",    tesc
  42.     OPTION    "main mnu",    tf10
  43.     OPTION    "Menu off",    nothing
  44.     MEND
  45.  
  46. editm:    MENU      ,2,67,NORMAL
  47.       OPTION    "Mark Bgn", markbgn
  48.       OPTION    "Mark End", markend
  49.       OPTION    "Copy Blk", copyblk
  50.       OPTION    "Move Blk", moveblk
  51.       OPTION    "Del  Blk", delblk
  52.           OPTION    "Main Mnu", tf10
  53.           OPTION    "<esc>",    tesc
  54.           OPTION    "Y(es)",    typey
  55.           OPTION    "N(o)",     typen
  56.           OPTION    "<-' enter",tenter
  57.           OPTION    "Menu Off", nothing
  58.           MEND
  59.  
  60. markbgn:  EXECUTE   tcntlk,typeb
  61. markend:  EXECUTE   tcntlk,typek
  62. copyblk:  EXECUTE   tcntlk,typec
  63. moveblk:  EXECUTE   tcntlk,typev
  64. delblk:   EXECUTE   tcntlk,typey
  65.  
  66. ;   --------------------- Misc ----------------------------------
  67. ;
  68. tf10:     TYPE 0,68
  69. tcntlk:   TYPE 11
  70. tenter:   TYPE 13
  71. tesc:     TYPE 27
  72. typeb:    TYPE "B"
  73. typec:    TYPE "C"
  74. typek:    TYPE "K"
  75. typen:    TYPE "N"
  76. typeq:    TYPE "Q"
  77. typev:    TYPE "V"
  78. typey:    TYPE "Y"